/**
 * 功能描述
 */
define(function (require, exports, module) {
    //引入视图基类
    var ELView = require("elview");

    //assets
    var template = require("./assets/tpl/livebookstatistics_main.tpl");
    require("./assets/css/livebookstatistics_main.css");

    //business

    //component
    var liveBookStatisticsGrid = require("./component/liveBookStatisticsGridComp");
    var liveBookStatisticsSubnav = require("./component/liveBookStatisticSubnavComp");

    //constant

    //handler

    //store

    var App = ELView.extend({
        attrs: {
            template: template
        },
        initComponent: function (params, widget) {
        	liveBookStatisticsSubnav.initComponent(params, widget);
        	liveBookStatisticsGrid.initComponent(params, widget);
        },
        afterInitComponent: function (params, widget) {
        	
        	widget.get("grid").refresh({
        		    "pkServicePoint": widget.get("subnav").getValue("servicepoint"),
				    "startDate": widget.get("subnav").getValue("visitDate").start,
					"endDate": widget.get("subnav").getValue("visitDate").end,
					fetchProperties:"roomtypename," 
					+ "roomcount,"
					+ "dayOne,"
					+ "dayTwo,"
					+ "dayThree,"
					+ "dayFour,"
					+ "dayFive,"
					+ "daySix,"
					+ "daySeven,"
					+ "dayEight,"
					+ "dayNine,"
					+ "dayTen,"
					+ "dayEleven,"
					+ "dayTwelve,"
					+ "dayThirdteen,"
					+ "dayFourteen,"
					+ "dayFifteen,"
        	});
        }
    });

    module.exports = App;
});
